12 Technical Information

This chapter lists information about SimpleWave which is only of interest to programmers who want to write software to control SimpleWave, or for people who want to translate the user messages into their own language.

If you write your own application to take advantage of the features of SimpleWave by using the information below, please let me know. I am interested in what you write and perhaps your product can be distributed along with SimpleWave.

Gestalt

When a Gestalt Selector equal to the creator code of SimpleWave is installed ('SWVE') this means SimpleWave is running or has run. In short: this computer's startup disk is maintained automatically. The response value conforms to the INITGestalt Standard (version 1.0) as proposed by Jeremy Roussak and René G.A. Ros. For more information on the INITGestalt email to: 'gestalt-selectors-list-request@bio.vu.nl' with the subject 'archive get INITGestalt*'.

  gestaltSimpleWaveTable = 'SWVE';

Apple Events

SimpleWave supports the required Apple events class. Of these four the kAEOpenDocuments and kAEPrintDocuments event IDs have no effect, while kAEOpenApplication and kAEQuitApplication have.
In addition it has its own Apple events class with seven event IDs:
  kAESimpleWaveEventClass = 'SWVE';
  kAESWVERecheck = 'chck';
  kAESWVEAbortCheck = 'abor';
  kAESWVEEmptyStartupDiskTrash = 'trsh';
  kAESWVECheckSkipFolder = 'skip';
  kAESWVEEmptySkipFolder = 'dels';
  kAESWVETraceOn = 'tron';
  kAESWVETraceOff = 'trof';
None of these events require attributes or parameters.

• kAESWVERecheck
Sending this Apple event causes SimpleWave to start checking the startup disk again. If the initial checking is still in progress the event will be saved and checking is restarted as soon as the initial check finishes. To avoid this you may want to send a kAESWVEAbortCheck event first. If a request to recheck is already queued you will get an errAEEventNotHandled error back. 

• kAESWVEAbortCheck
This Apple event lets SimpleWave abort the current checking action. This may have a delay because SimpleWave will finish copying a file or finish other things it is working on.
If a request to abort is already queued you will get an errAEEventNotHandled error back.

• kAESWVEEmptyStartupDiskTrash
The kAESWVEEmptyStartupDiskTrash Apple Event causes all items from the startup disk, currently inside the Trash, to be deleted.

• kAESWVECheckSkipFolder
This Apple event causes SimpleWave to recheck the Skip Folder to delete files and folders which are longer in the Skip Folder than the preset delay time.

• kAESWVEEmptySkipFolder
The kAESWVEEmptySkipFolder Apple event deletes all files and folders in the Skip Folder when this event is received by SimpleWave.

• kAESWVETraceOn = 'tron';
Using this Apple event turns the trace messages on. No error is returned if the trace messages are already on.

• kAESWVETraceOff = 'trof';
And this Apple event turns the trace messages off. No error is returned if the trace messages are already off.

Translating

When you want to translate the English user messages into another language you need to translate the STR# resource with ID 200 of the SimpleWave extension. Notify the author of SimpleWave before you start working on the translation. This is because your translated resource needs its own resource ID which is assigned for each language. Also, someone may already be working on the same language, or if a newer version of SimpleWave is about to be released you can translate that version instead.

Each text item can not be longer than 255 characters when displayed. When replacement markers are used in the text, which are filled in by SimpleWave (see below), the total length must include the maximum length of each replacement.

Inside the text several markers are included which are replaced by SimpleWave at runtime with the appropriate text and numbers. Below is a list of these markers, their meaning and the number of characters you need to reserve in the total text length of each message in which they're used.

   Code  Description                                       Length
   ^ADM  Text with how to contact the administrator.       25
   ^DLY  Skip Folder delay time in days.                   3
   ^DES  Name of the startup disk (destination).           31
   ^ERR  Text describing the error which occurred. If no
         text is available a number is used.               63
   ^FUL  Number of files not being copied because the
         destination disk is full.                         3
   ^MAC  Unique Macintosh model type number.               3
   ^NAM  Name of the file or folder the message is about.  63
   ^SCR  Script code of the current system software.       3

Some of these markers are not used with User Messages but only with Trace Messages. The Trace Messages shouldn't be translated.
While translating the text, do not remove or add any of these markers. They are explained here to let you know by what text they are replaced, in order for you to translate and get the proper text displayed.